package com.jingdianjichi.user.controller;
import com.jingdianjichi.Util.RedisUtil;
import com.jingdianjichi.user.SysUser.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class Testcontorller {
    @Autowired
    private RedisUtil redisUtil;

    @GetMapping("/test")
    public String test() {
        return "Hello World";
    }

    @GetMapping("/testRedis")//redis数据库
    public void testRedis() {
    redisUtil.set("name","yh");
    }

    @PostMapping("/testQuery")// 日期交互
    public void testQuery(@RequestBody SysUser sysUser) throws Exception {
        System.out.println(sysUser);
    }
}